import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/views/login'
import Home from '@/views/home'
import Index from '@/views/index'
import studentInformation from '@/views/studentInformation'
import measurementScale from '@/views/measurementScale'
import archives from '@/views/studentInformation/components/student/archives'
import measurementPlan from '@/views/measurementPlan'
import addplan from '@/views/measurementPlan/components/addPlan.vue'
import editplan from '@/views/measurementPlan/components/editPlan.vue'
import copyplan from '@/views/measurementPlan/components/copyPlan.vue'
import progress from '@/views/measurementPlan/components/progress.vue'
import addSelfList from '@/views/measurementScale/components/selfMeasurementPage/addSelfList.vue'
import editSelfList from '@/views/measurementScale/components/selfMeasurementPage/editSelfList.vue'
import copySelfList from '@/views/measurementScale/components/selfMeasurementPage/copySelfList.vue'
import checkReport from '@/views/checkReport'
import personnelAccess from '@/views/personnelAccess'
import addRole from '@/views/personnelAccess/components/role/addRole.vue'
import editRole from '@/views/personnelAccess/components/role/editRole.vue'
import viewRole from '@/views/personnelAccess/components/role/viewRole.vue'
import schoolarchives from '@/views/studentInformation/components/hierarchy/archives/index.vue'
import crisis from '@/views/crisis/index.vue'
import warning from '@/views/warning/index.vue'
import supplement from '@/views/crisis/components/crisisList/supplement.vue'
import studentCrisis from '@/views/crisis/components/crisisList/studentCrisis.vue'
import dailyReport from '@/views/crisis/components/crisisList/dailyReport.vue'
import dailyReportDetails from '@/views/crisis/components/crisisList/components/dailyReport.vue'
import addWarning from '@/views/crisis/components/crisisList/components/addWarning.vue'
import answer from '@/views/checkReport/components/personal/components/answer.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: '登录',
      component: Login,
      meta: {
        title: '登录'
      }
    },
    {
      path: '/Home',
      name: '首页',
      component: Home,
      meta: {
        title: '学校管理端'
      },
      children: [
        {
          path: '/index',
          name: '平台首页',
          component: Index
        },
        {
          path: '/studentInformation',
          name: '学生信息',
          component: studentInformation
        },
        {
          path: '/schoolarchives',
          name: '学校档案',
          component: schoolarchives
        },
        {
          path: '/archives',
          name: '个人档案',
          component: archives
        },
        {
          path: '/measurementScale',
          name: '测评量表',
          component: measurementScale
        },
        {
          path: '/measurementPlan',
          name: '测评计划',
          component: measurementPlan
        },
        {
          path: '/addplan',
          name: '新增测评计划',
          component: addplan
        },
        {
          path: '/editplan',
          name: '编辑测评计划',
          component: editplan
        },
        {
          path: '/copyplan',
          name: '复制测评计划',
          component: copyplan
        },
        {
          path: '/progress',
          name: '测评进度',
          component: progress
        },
        {
          path: '/addSelfList',
          name: '新增测评组合',
          component: addSelfList
        },
        {
          path: '/editSelfList',
          name: '编辑测评组合',
          component: editSelfList
        },
        {
          path: '/copySelfList',
          name: '复制测评组合',
          component: copySelfList
        },
        {
          path: '/checkReport',
          name: '查看报告',
          component: checkReport
        },
        {
          path: '/personnelAccess',
          name: '人员权限',
          component: personnelAccess
        },
        {
          path: '/addRole',
          name: '添加角色',
          component: addRole
        },
        {
          path: '/editRole',
          name: '编辑角色',
          component: editRole
        },
        {
          path: '/viewRole',
          name: '查看权限',
          component: viewRole
        },
        {
          path: '/crisis',
          name: '危机管理',
          component: crisis
        },
        {
          path: '/warning',
          name: '预警管理',
          component: warning
        },
        {
          path: '/supplement',
          name: '危机管理补充信息',
          component: supplement
        },
        {
          path: '/studentCrisis',
          name: '学生危机管理',
          component: studentCrisis
        },
        {
          path: '/dailyReport',
          name: '学生日常上报',
          component: dailyReport
        },
        {
          path: '/dailyReportDetails',
          name: '日常上报查看详情',
          component: dailyReportDetails
        },
        {
          path: '/addWarning',
          name: '添加预警查看详情',
          component: addWarning
        },
        {
          path: '/answer',
          name: '作答详情',
          component: answer
        },
        {
          path: '/resourceSpace/:type',
          name: '资源空间',
          component: () => import('@/views/resourceSpace/index.vue')
        }
      ]
    }
  ]
})
